package com.turing.post.report.util;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Table;

import com.turing.post.util.PCPSUtil;
/**
 * 联机转账对帐明细
 * @author ZXL
 *
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "ONLINETRANSFERCHKACCCTLDETAIL")
@IdClass(OnlineTransferChkAccCtlDetail.class)
public class OnlineTransferChkAccCtlDetail implements Serializable{
	/**
	 * 银行管理ID
	 */
	private BigInteger bankManageId;
	/**
	 * 对帐日期
	 */
	private Date checkDate;
	/**
	 * 发卡商号
	 */
	private String issueCompanyNo;
	/**
	 * 本地流水号
	 */
	private String localSeqNo;
	/**
	 * 银行流水号
	 */
	private String bankSeqNo;
	/**
	 * 卡号
	 */
	private String cardNo;
	/**
	 * 发生额
	 */
	private BigInteger amount;
	/**
	 * 银行明细
	 */
	private String isBank;
	/**
	 * 系统明细
	 */
	private String isSys;
	
	@Id
	@Column(name = "BANKMANAGEID")
	public BigInteger getBankManageId() {
		return bankManageId;
	}
	public void setBankManageId(BigInteger bankManageId) {
		this.bankManageId = bankManageId;
	}
	@Id
	@Column(name = "CHECKDATE")
	public Date getCheckDate() {
		return checkDate;
	}
	public void setCheckDate(Date checkDate) {
		this.checkDate = checkDate;
	}
	public String getIssueCompanyNo() {
		return issueCompanyNo;
	}
	public void setIssueCompanyNo(String issueCompanyNo) {
		this.issueCompanyNo = issueCompanyNo;
	}
	@Id
	@Column(name = "LOCALSEQNO")
	public String getLocalSeqNo() {
		return localSeqNo;
	}
	public void setLocalSeqNo(String localSeqNo) {
		this.localSeqNo = localSeqNo;
	}
	@Id
	@Column(name = "BANKSEQNO")
	public String getBankSeqNo() {
		return bankSeqNo;
	}
	public void setBankSeqNo(String bankSeqNo) {
		this.bankSeqNo = bankSeqNo;
	}
	@Column(name = "CARDNO")
	public String getCardNo() {
		return cardNo;
	}
	public void setCardNo(String cardNo) {
		this.cardNo = cardNo;
	}
	@Column(name = "AMOUNT")
	public BigInteger getAmount() {
		return amount;
	}
	public void setAmount(BigInteger amount) {
		this.amount = amount;
	}
	@Column(name = "ISBANK")
	public String getIsBank() {
		return isBank;
	}
	public void setIsBank(String isBank) {
		this.isBank = isBank;
	}
	@Column(name = "ISSYS")
	public String getIsSys() {
		return isSys;
	}
	public void setIsSys(String isSys) {
		this.isSys = isSys;
	}
	
	@Override
	public int hashCode() {
		return PCPSUtil.getObjectListHashCode(new Object[] { getBankManageId(),
				getBankSeqNo(),getCheckDate(),getLocalSeqNo()});
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (!(obj instanceof OnlineTransferChkAccCtlDetail))
			return false;
		OnlineTransferChkAccCtlDetail other = (OnlineTransferChkAccCtlDetail) obj;
		if (!PCPSUtil
				.compareObject(this.getBankManageId(), other.getBankManageId()))
			return false;
		if (!PCPSUtil
				.compareObject(this.getBankSeqNo(), other.getBankSeqNo()))
			return false;
		if (!PCPSUtil
				.compareObject(this.getCheckDate(), other.getCheckDate()))
			return false;
		return PCPSUtil
				.compareObject(this.getLocalSeqNo(), other.getLocalSeqNo());
	}
	
	
}
